<template>
  <div class="app-container bg-transparent">
    <info-card :info="taskInfo" />
    <env-check-list v-if="type === 'env'" :task-no="taskNo" class="mt20" />
    <security-check-list v-else :task-no="taskNo" class="mt20" />
  </div>
</template>

<script>
import InfoCard from './InfoCard'
import EnvCheckList from './EnvCheckList'
import SecurityCheckList from './SecurityCheckList'

export default {
  name: 'TaskDetail',
  components: { InfoCard, EnvCheckList, SecurityCheckList },
  props: {
    taskNo: {
      type: String,
      required: true
    },
    type: { // 任务类型：环保任务和安全任务
      type: String,
      required: true
    }
  },
  data() {
    return {
      loading: true,
      taskInfo: {}
    }
  },
  created() {
    this.loadData()
  },
  methods: {
    /** 查询客户详细信息 */
    loadData() {
      this.loading = true
      // getRole(parseInt(this.id)).then(res => {
      //   this.clientInfo = res.data
      //   this.loading = false
      // })
    }
  }
}
</script>
<style lang="scss" scoped>

</style>
